package javaHomework;

public class Student {
    private String name;
    private String classid;
    private String id;
    private String gender;
    private int age;
    private String personality;

    public Student(String name,String classid,String id,String gender,int age,String personality)
    {this.name=name;
    this.classid=classid;
    this.id=id;
    this.gender=gender;
    this.age=age;
    this.personality=personality;}

    public String getName() {
        return name;
    }

    public String getClassid() {
        return classid;
    }

    public String getGender() {
        return gender;
    }

    public String getId() {
        return id;
    }

    public int getAge() {
        return age;
    }

    public String getPersonality() {
        return personality;
    }
    public String getInformation(){
        return "我的名字是"+name+ "，我今年"+age+"岁"+",来自"+classid+"班"+",学号是"+id+"，性别"+gender+"。我的性格"+personality;
    }

    public static void main(String[] args) {
        Student stu1=new Student("a","1","1","女",10,"活泼");
        Student stu2=new Student("b","2","2","男",10,"开朗");
        Student stu3=new Student("c","3","3","女",10,"外向");
        System.out.println(stu1.getInformation());
        System.out.println(stu2.getInformation());
        System.out.println(stu3.getInformation());
    }
}

